package rs.udd.service.dto.user;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.validator.constraints.Email;

public abstract class AbstractUserRegisterDto {

	@NotNull
	@Size(min = 3)
	private String username;

	@NotNull
	@Size(min = 3)
	private String password;

	@NotNull
	@Size(min = 3)
	private String firstname;

	@NotNull
	@Size(min = 3)
	private String lastname;

	@Email
	@NotNull
	@Size(min = 3)
	private String email;

	public AbstractUserRegisterDto() {

	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getFirstname() {
		return firstname;
	}

	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}

	public String getLastname() {
		return lastname;
	}

	public void setLastname(String lastname) {
		this.lastname = lastname;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Override
	public String toString() {

		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
				.append(super.toString())
				.append("username", username)
				.append("firstname", firstname)
				.append("lastname", lastname)
				.append("email", email)
				.toString();
	}

}
